#pragma once

enum OBJECT_TYPE
{
	TYPE_OBJECT,
	TYPE_LOCATABLEOBJECT,
	TYPE_STATICOBJECT,
	TYPE_AURAOBJECT,
	TYPE_UNIT,
	TYPE_CREATURE,
	TYPE_PLAYER,
	TYPE_AUTOPLAYER,
	TYPE_MAX
};

enum OBJECT_TYPE_FLAG
{
	TYPE_OBJECT_FLAG		  = (1 << TYPE_OBJECT),
	TYPE_LOCATABLEOBJECT_FLAG = (1 << TYPE_LOCATABLEOBJECT) | TYPE_OBJECT_FLAG,
	TYPE_STATICOBJECT_FLAG	  = (1 << TYPE_STATICOBJECT)	| TYPE_LOCATABLEOBJECT_FLAG,
	TYPE_AURAOBJECT_FLAG	  = (1 << TYPE_AURAOBJECT)		| TYPE_LOCATABLEOBJECT_FLAG,
	TYPE_UNIT_FLAG			  = (1 << TYPE_UNIT)			| TYPE_LOCATABLEOBJECT_FLAG,
	TYPE_CREATURE_FLAG		  = (1 << TYPE_CREATURE)		| TYPE_UNIT_FLAG,
	TYPE_PLAYER_FLAG		  = (1 << TYPE_PLAYER)			| TYPE_UNIT_FLAG,
	TYPE_AUTOPLAYER_FLAG	  = (1 << TYPE_AUTOPLAYER)		| TYPE_PLAYER_FLAG,
};

enum OBJECT_PROPERTIES
{
	OBJECT_FIELD_FLAGS,
	OBJECT_END
};

enum LOCATABLEOBJECT_PROPERTIES
{
	LOBJ_FIELD_FLAGS = OBJECT_END,
	LOBJ_END,
};

enum STATICOBJECT_PROPERTIES
{
	SOBJ_FIELD_FLAGS = LOBJ_END,
	SOBJ_END,
};

enum AURAOBJECT_PROPERTIES
{
	AOBJ_FIELD_FLAGS = LOBJ_END,
	AOBJ_END,
};

enum UNIT_PROPERTIES
{
	UNIT_FIELD_FLAGS = LOBJ_END,
	UNIT_FIELD_LEVEL,

	UNIT_FLOAT_MOVE_SPEED,
	UNIT_FLOAT_MOVE_SPEED_INC,
	UNIT_FLOAT_TURN_SPEED,
	UNIT_FLOAT_TURN_SPEED_INC,

	UNIT_FIELD_AURA_FLAGS,

	UNIT_FIELD_TEAM_SIDE,

	UNIT_END,
};

enum CREATURE_PROPERTIES
{
	CREATURE_FIELD_FLAGS = UNIT_END,
	CREATURE_END,
};

enum PLAYER_PROPERTIES
{
	PLAYER_FIELD_FLAGS = UNIT_END,
	PLAYER_FIELD_CAREER,
	PLAYER_FIELD_GENDER,

	PLAYER_FIELD_PVP_FLAGS,

	PLAYER_END,
};

enum AUTOPLAYER_PROPERTIES
{
	APC_FIELD_FLAGS = PLAYER_END,
	APC_END,
};

enum OBJECT64_PROPERTIES
{
	OBJECT64_FIELD_FLAGS,
	OBJECT64_END
};

enum LOCATABLEOBJECT64_PROPERTIES
{
	LOBJ64_FIELD_FLAGS = OBJECT64_END,
	LOBJ64_END,
};

enum STATICOBJECT64_PROPERTIES
{
	SOBJ64_FIELD_FLAGS = LOBJ64_END,
	SOBJ64_END,
};

enum AURAOBJECT64_PROPERTIES
{
	AOBJ64_FIELD_FLAGS = LOBJ64_END,
	AOBJ64_END,
};

enum UNIT64_PROPERTIES
{
	UNIT64_FIELD_FLAGS = LOBJ64_END,

	UNIT64_FIELD_HP,
	UNIT64_FIELD_HP_MAX,
	UNIT64_FIELD_MP,
	UNIT64_FIELD_MP_MAX,

	UNIT64_END,
};

enum CREATURE64_PROPERTIES
{
	CREATURE64_FIELD_FLAGS = UNIT64_END,
	CREATURE64_END,
};

enum PLAYER64_PROPERTIES
{
	PLAYER64_FIELD_FLAGS = UNIT64_END,

	PLAYER64_FIELD_EXP,
	PLAYER64_FIELD_LVUP_EXP,

	PLAYER64_FIELD_FIGHT_VALUE,

	PLAYER64_FIELD_CURRENCY_BEGIN,
	PLAYER64_FIELD_CURRENCY_END = PLAYER64_FIELD_CURRENCY_BEGIN + (int)CurrencyType::Max - 1,

	PLAYER64_END,
};

enum AUTOPLAYER64_PROPERTIES
{
	APC64_FIELD_FLAGS = PLAYER64_END,
	APC64_END,
};

enum PVP_FLAG
{
	PVP_FLAG_ENABLE_PVP = 1 << 0,
	PVP_FLAG_ENABLE_ZONE_SAFE = 1 << 1,
};

enum AURA_STATE
{
	AURA_STATE_INVINCIBLE,
	AURA_STATE_INVISIBLE,
	AURA_STATE_FETTER,
	AURA_STATE_STUN,
	AURA_STATE_COUNT
};

enum AURA_FLAG
{
	AURA_STATE_FLAG_INVINCIBLE = 1 << AURA_STATE_INVINCIBLE,
	AURA_STATE_FLAG_INVISIBLE = 1 << AURA_STATE_INVISIBLE,
	AURA_STATE_FLAG_FETTER = 1 << AURA_STATE_FETTER,
	AURA_STATE_FLAG_STUN = 1 << AURA_STATE_STUN,
};

enum ETHEREAL_FLAG
{
	ETHEREAL_PLAYER_INTERESTING = 1 << 0,
	ETHEREAL_CREATURE_INTERESTING = 1 << 1,
};

#define S64CURRENCY(type) (PLAYER64_FIELD_CURRENCY_BEGIN + int(type) - 1)
